package core.data;

public class EventActions<T> {
    private HandleEvent<T> success;
    private HandleEvent<T> failure;
    private HandleEvent<T> finish;
    private HandleListen<T> listen;

    public boolean hasSuccess() {
        return success != null;
    }

    public HandleEvent<T> getSuccess() {
        return success;
    }

    public void setSuccess(HandleEvent<T> success) {
        this.success = success;
    }

    public boolean hasFailure() {
        return failure != null;
    }

    public HandleEvent<T> getFailure() {
        return failure;
    }

    public void setFailure(HandleEvent<T> failure) {
        this.failure = failure;
    }

    public boolean hasFinish() {
        return failure != null;
    }

    public HandleEvent<T> getFinish() {
        return finish;
    }

    public void setFinish(HandleEvent<T> finish) {
        this.finish = finish;
    }

    public HandleListen<T> getListen() {
        return listen;
    }

    public void setListen(HandleListen<T> listen) {
        this.listen = listen;
    }

    public boolean hasListen() {
        return listen != null;
    }
}
